package com.tanhua.server.pojo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import java.util.Date;

/**
 * @description:注解测试类
 * @author: 浩克
 * @date: Created in 2021/2/10 22:00
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
//日志形式打印结果
@Slf4j
//可链式编程对象
@Builder
//单独使用set/get
//@Setter
//@Getter
public class Item {

    private Long id;
    private String title;
    private Date created;

    public static void main(String[] args) {
        Item item1 = new Item();
        item1.setId(111L);
        item1.setTitle("aaa");

      //  @Slf4j 注解不需要sout打印,日志流打印
      //  System.out.println(item);
        log.info(item1.toString());

        Item item2 = Item.builder().id(222L).title("bbb").build();
        log.info(item2.toString());

    }

}
